package com.zian.domain.dto;

import com.zian.validation.ValidGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;

@Data
@ApiModel(description = "首页配置DTO")
public class IndexConfigDTO {

    @ApiModelProperty( "首页配置项主键id")
    @Null(message = "新增数据时id必须为空", groups = {ValidGroup.Crud.Create.class})
    @NotNull(message = "修改数据时id不能为空", groups = {ValidGroup.Crud.Update.class})
    private Integer id;

    @ApiModelProperty( "配置类型")
    @NotNull(message = "配置类型不能为空")
    private Integer configType;

    @ApiModelProperty( "配置名称")
    @NotBlank(message = "配置名称不能为空")
    private String configName;

    @ApiModelProperty( "关联商品id")
    private Long goodsId;

    @ApiModelProperty( "显示排序")
    @NotNull(message = "排序值不能为空")
    private Integer configRank;

    @ApiModelProperty( "点击后的跳转地址")
    private String redirectUrl;


}
